<template>
    <div class="login">
        <span class="logo"></span>
        <div class="login-main-con">
            <div class="time-con">
                <p>欢迎回来，</p>
                <p class="time">今天是{{judgeTime()}}</p>
            </div>
            <login-main />
        </div>
        <p class="footer">
            <span>Copyright©2020 Shenzhen Syswinsoft technology Co. Ltd. All Rights Reserved.</span>
            <span>(C)1994-2020 深圳市思源计算机软件股份有限公司 版权所有 粤ICP备05040628号</span>
        </p>
    </div>
</template>

<script>
    import LoginMain from './loginMain'
    export default {
        components: {
            LoginMain
        },
        methods: {
            judgeTime () {
                let dateObj = new Date();
                let year = dateObj.getFullYear();
                let month = dateObj.getMonth() + 1 >= 10 ? dateObj.getMonth() + 1 : '0' + (dateObj.getMonth() + 1);
                let date = dateObj.getDate();
                // const arr = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
                // let day = arr[dateObj.getDay()];
                return year + '年' + month + '月' + date + '日';
            }
        }
    }
</script>

<style lang="scss" scoped>
.login {
    height: 100%;
    position: relative;
    background: url(./imgs/login_bg.jpg) no-repeat center center;
    background-size: cover;
    .logo {
        width: 173px;
        height: 20px;
        display: block;
        position: absolute;
        background: url(./imgs/logo.png) no-repeat;
        top: 50px;
        left: 20%;
    }
    .login-main-con {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 480px;
        transform: translate(-50%, -50%);
        .time-con {
            position: absolute;
            width: 100%;
            top: -115px;
            padding-left: 90px;
            color: #fff;
            font-size: 24px;
            font-weight: 300;
            line-height: 37px;
            user-select: none;
        }
    }
    .footer {
        width: 100%;
        position: absolute;
        bottom: 61px;
        font-size: 14px;
        font-weight: 500;
        color: #333;
        line-height: 21px;
        letter-spacing: 1px;
        text-align: center;
        span {
            display: block;
        }
    }
}
</style>